<div class="ibox">
	<div class="ibox-content">
		<form class="form-horizontal" id="addForm" action="${cxt!}/cms/article/add" method="POST" >
           <div class="form-group">
	             <label for="namebasic" class="col-md-2 control-label">${_res["article.title"]}<span class="fontColorRed">&nbsp;*</span></label>
	             <div class="col-md-3 ">
	              	<input type="text" class="form-control" name="article.title" placeholder="${_res['article.title']}" required aria-required="true">
	             </div>
	             
	             <label for="partentInputId" class="col-md-2 control-label">${_res["article.classification"]}<span class="fontColorRed">&nbsp;*</span></label>
	             <div class="col-md-3">
	                <!-- 父菜单id，从modal中获取 -->
	              	<input type="text" class="form-control" id="catalogName" placeholder="${_res['article.pleaseChoose']}" data-toggle="modal" data-target="#myModal">
	              	<input type="hidden" name="article.catalogid"  id="catalogid" required aria-required="true"/>
	             </div>	 
           </div>
           <div class="hr-line-dashed"></div>
           
            <div class="form-group">
                <label class="col-sm-2 control-label">${_res["article.status"]}<span class="fontColorRed">&nbsp;*</span></label>
                <div class="col-sm-3">
                    <#dict type="select" name="article.status"  dictCode="COMMON_STATUS" defaultValue="0"  required="true"/>
                </div>	   
                
	             <label for="namebasic" class="col-md-2 control-label">${_res["article.articleWeight"]}<span class="fontColorRed">&nbsp;*</span></label>
	             <div class="col-md-3">
	              	<input type="text" class="form-control" name="article.priority" placeholder="${_res['article.articleWeight']}"  number="true" required aria-required="true">
	             </div>	                  
           </div>
           <div class="hr-line-dashed"></div>
           
           <label>${_res["article.content"]}<span class="fontColorRed">&nbsp;*</span></label>
           <script id="container" name="article.content" type="text/plain" style="width:100%; min-height:500px !important"></script>
           
		   <div class="hr-line-dashed"></div>
		
			<div class="form-group">
				<div class="row">
					<div class="col-md-10 col-md-offset-2">
		              	<% if(hasPrivilegeUrl("articleList")){ %>
		                	<button type="button" class="btn btn-warning" onClick="ajaxContent('/cms/article/list')">${_res["system.return"]}</button>
		                <% } %>
		              	<% if(hasPrivilegeUrl("articleAdd")){ %>
		                <button type="submit" class="btn btn-primary" >${_res["system.save"]}</button>
		                <% } %>
		              	<% if(hasPrivilegeUrl("articleList")){ %>
		                <button type="button" class="btn btn-danger" onClick="ajaxContent('/cms/article/list')">${_res["system.cancel"]}</button>
		                <% } %>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>
<#submit  formId="addForm"  divId="content" />
<#nav />        
        
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModaLabel">
	<form class="form-horizontal">
	  <div class="modal-dialog" role="document">
	    <div class="modal-content">
	     <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	        <h4 class="modal-title" id="myModaLabel">${_res["article.parentMenu"]}</h4>
	      </div>
	      <div class="modal-body">
	      		<%include("selectPartentNode.html"){}%>
	      </div>
	      
	      <div class="form-group">
				<div class="row">
					<div class="col-md-6">
						<label class="col-md-12 control-label "> 
				      	<% if(hasPrivilegeUrl("articleList")){ %>
					        <button type="button" class="btn btn-warning" data-dismiss="modal">${_res["system.return"]}</button>
			            <% } %>
				        
				      	<% if(hasPrivilegeUrl("articleList")){ %>
					        <button type="button" class="btn btn-primary" data-dismiss="modal">${_res["system.save"]}</button>
			            <% } %>
						</label>
					</div>
				</div>
			</div>
	    </div>
	  </div>
	 </form>
</div>

<script>
	$(document).ready(function(){
		var editor = new UE.ui.Editor();  
	    editor.render("container");
		//增加模拟框拖动效果
		$(".modal").draggable({
		    handle: ".modal-header"
		});
	});
	

</script>